{% assign endpath = page.url | split: '/' | last %}

{% for p in site.tags[page.version] %}
<div class='space-bottom'>
  <a class='block quiet strong small truncate {% if endpath == p.version %}active{% endif %}' href='{{site.baseurl}}/api/{{p.version}}/'>API {{p.version}}</a>
</div>
{% for section in p.navigation %}
<div class='space-bottom1'>
  <strong class='block quiet small'>{{section.title}}</strong>
  {% for nav in section.nav %}
  <a class='block small truncate {% if endpath == nav.id | replace: ' ', '_' | downcase %}active{% endif %}' href='{{site.baseurl}}/api/{{p.version}}/{{nav.id|replace:' ','_'|downcase}}/'>{{nav.title}}</a>
  {% endfor %}
</div>
{% endfor %}
{% endfor %}
